﻿@using MSAcademic.v2.Infrastructure.User
@model MSAcademic.v2.Web.Areas.Admin.Models.Login.RegistrationModel

@{
    ViewBag.Title = "Registracija";
}

<img src="~/Areas/Admin/Content/Images/admin-logo.png" />

@if (!Model.IsFormSuccess)
{
    <h2>Registracija</h2>
    
    using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()
        @Html.HiddenFor(x => x.RegToken)

        @Html.TextBoxFor(x => x.Email, new { @placeholder =  "Treba nam vaša e-mail adresa" })
        @Html.ValidationMessageFor(x => x.Email)
    
        @Html.TextBoxFor(x => x.Username, new { @placeholder =  "Vaše korisničko ime" })
        @Html.ValidationMessageFor(x => x.Username)
        
        @Html.PasswordFor(x => x.Password, new { @placeholder =  "Vaša (sigurna) lozinka" })
        @Html.ValidationMessageFor(x => x.Password)
        
        @Html.PasswordFor(x => x.RepeatedPassword, new { @placeholder =  "Vaša ponovljena lozinka" })
        @Html.ValidationMessageFor(x => x.RepeatedPassword)

        <div class="actions-wrapper"> 
            <a class="positive submit">Beam me up Scotty! <i class="icon-arrow-right"></i></a> 
        </div>
    }
}
else
{
    <h2>Uspješno ste se registrirali :)</h2>
    <br/>

    switch (Model.ActingRole)
    {
        case ActingRole.Pripravnik:
            <p> Registrirani ste i prijavljeni na msacademic.hr portalu kao <i>pripravnik u MSP programu</i>. Vaš username je <b>@Model.Username</b>. </p>
            break;
        case ActingRole.Msp:
            <p> Registrirani ste i prijavljeni na msacademic.hr portalu kao <i>Microsoft Student Partner</i>. Vaš username je <b>@Model.Username</b>. </p>
            break;
        case ActingRole.VanjskiSuradnik:
            <p> Registrirani ste i prijavljeni na msacademic.hr portalu kao <i>vanjski suradnik portala</i>. Vaš username je <b>@Model.Username</b>. </p>
        break;    
    }
    
    <br/>
    <p>@Html.RouteLink("Uđi u administraciju", "AdminHome") </p>
}